<template>
    <div>
        <van-nav-bar title="订单详情" left-text="返回" left-arrow @click-left="($router.push('/list'))" />
        <p style="text-align: center;color: red;" v-show="js">待支付(29分{{ time }}秒)</p>
        <van-cell-group>
            <van-cell title="订单号" value="204001" />
            <van-cell title="下单时间" value="2024—06-14 12:00:00" />
            <van-cell title="收件人" value="张三" />
            <van-cell title="地址" value="北京市朝阳区" />
            <van-cell title="总金额" value="200.00" />
           
           
        </van-cell-group>
        <van-button  block type="primary" native-type="submit">
      立即支付
    </van-button>

    </div>
</template>

<script setup>
import { ref } from 'vue';
let time = ref(30)
let timer;
let js = ref(true)
timer = setInterval(() => {
    time.value--
    if (time.value == 0) {
        clearInterval(timer)
        js.value = false
    }
}, 1000)

</script>

<style lang="scss" scoped></style>